<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class Swift_Log</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class Swift_Log</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
							<a href="#sec-descendents">Descendents</a>
			|											<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
						|											<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">The Logger class/interface.</p>
	<ul class="tags">
				<li><span class="field">author:</span> Chris Corbyn &lt;<a href="mailto:chris@w3style.co.uk">chris@w3style.co.uk</a>&gt;</li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_Swift---Log.php.html">/Swift/Log.php</a> (line <span class="field">26</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>

	<a name="sec-descendents"></a>
	<div class="info-box">
		<div class="info-box-title">Direct descendents</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
			<span class="disabled">Descendents</span>
			|												<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
								|															<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
								</div>
		<div class="info-box-body">
			<table cellpadding="2" cellspacing="0" class="class-table">
				<tr>
					<th class="class-table-header">Class</th>
					<th class="class-table-header">Description</th>
				</tr>
								<tr>
					<td style="padding-right: 2em"><a href="../Swift_Log/Swift_Log_DefaultLog.html">Swift_Log_DefaultLog</a></td>
					<td>
											The Default Logger class
										</td>
				</tr>
							</table>
		</div>
	</div>


	<a name="sec-var-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Variable Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
							<a href="#sec-descendents">Descendents</a> |
						<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
							| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
								</div>
		<div class="info-box-body">
			<div class="var-summary">
																																																																																																																<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$COMMAND" title="details" class="var-name">$COMMAND</a>
				</div>
																<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$ERROR" title="details" class="var-name">$ERROR</a>
				</div>
																<div class="var-title">
					<span class="var-type">array</span>
					<a href="#$failedRecipients" title="details" class="var-name">$failedRecipients</a>
				</div>
																<div class="var-title">
					<span class="var-type">int</span>
					<a href="#$logLevel" title="details" class="var-name">$logLevel</a>
				</div>
																<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$LOG_ERRORS" title="details" class="var-name">$LOG_ERRORS</a>
				</div>
																<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$LOG_EVERYTHING" title="details" class="var-name">$LOG_EVERYTHING</a>
				</div>
																<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$LOG_FAILURES" title="details" class="var-name">$LOG_FAILURES</a>
				</div>
																<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$LOG_NETWORK" title="details" class="var-name">$LOG_NETWORK</a>
				</div>
																<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$LOG_NOTHING" title="details" class="var-name">$LOG_NOTHING</a>
				</div>
																<div class="var-title">
					<span class="var-type">int</span>
					<a href="#$maxSize" title="details" class="var-name">$maxSize</a>
				</div>
																<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$NORMAL" title="details" class="var-name">$NORMAL</a>
				</div>
																<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$RESPONSE" title="details" class="var-name">$RESPONSE</a>
				</div>
											</div>
		</div>
	</div>

	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
							<a href="#sec-descendents">Descendents</a> |
																		<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
				 
				|
						<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																																																												
												<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#add" title="details" class="method-name">add</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$text</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$type</span> = <span class="var-default">SWIFT_LOG_NORMAL</span>])
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#addFailedRecipient" title="details" class="method-name">addFailedRecipient</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$address</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#clear" title="details" class="method-name">clear</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#dump" title="details" class="method-name">dump</a>
											([<span class="var-type">boolean</span>&nbsp;<span class="var-name">$return_only</span> = <span class="var-default">false</span>])
									</div>
																<div class="method-definition">
											<span class="method-result">array</span>
										<a href="#getFailedRecipients" title="details" class="method-name">getFailedRecipients</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">int</span>
										<a href="#getLogLevel" title="details" class="method-name">getLogLevel</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">int</span>
										<a href="#getMaxSize" title="details" class="method-name">getMaxSize</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">boolean</span>
										<a href="#hasLevel" title="details" class="method-name">hasLevel</a>
											(<span class="var-type">int</span>&nbsp;<span class="var-name">$level</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#isEnabled" title="details" class="method-name">isEnabled</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#setLogLevel" title="details" class="method-name">setLogLevel</a>
											(<span class="var-type">int</span>&nbsp;<span class="var-name">$level</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#setMaxSize" title="details" class="method-name">setMaxSize</a>
											(<span class="var-type">int</span>&nbsp;<span class="var-name">$size</span>)
									</div>
								</div>
		</div>
	</div>		

	<a name="sec-vars"></a>
	<div class="info-box">
		<div class="info-box-title">Variables</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
							<a href="#sec-descendents">Descendents</a> |
										<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
						
			
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			<a name="var$COMMAND" id="$COMMAND"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$COMMAND</span>
			 = <span class="var-default"> &quot;&gt;&gt;&quot;</span>			(line <span class="line-number">31</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">A command type entry</p>
	
	
		
		

</div>
<a name="var$ERROR" id="$ERROR"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$ERROR</span>
			 = <span class="var-default"> &quot;!!&quot;</span>			(line <span class="line-number">39</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">An error type entry</p>
	
	
		
		

</div>
<a name="var$failedRecipients" id="$failedRecipients"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">array</span>
			<span class="var-name">$failedRecipients</span>
			 = <span class="var-default">array()</span>			(line <span class="line-number">68</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Failed recipients</p>
	
	
		
		

</div>
<a name="var$logLevel" id="$logLevel"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">int</span>
			<span class="var-name">$logLevel</span>
			 = <span class="var-default"> SWIFT_LOG_NOTHING</span>			(line <span class="line-number">78</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">The level of logging currently set.</p>
	
	
		
		

</div>
<a name="var$LOG_ERRORS" id="$LOG_ERRORS"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$LOG_ERRORS</span>
			 = <span class="var-default"> 1</span>			(line <span class="line-number">51</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Only errors are logged.</p>
	
	
		
		

</div>
<a name="var$LOG_EVERYTHING" id="$LOG_EVERYTHING"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$LOG_EVERYTHING</span>
			 = <span class="var-default"> 4</span>			(line <span class="line-number">63</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Runtime info + SMTP instructions + failures + errors.</p>
	
	
		
		

</div>
<a name="var$LOG_FAILURES" id="$LOG_FAILURES"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$LOG_FAILURES</span>
			 = <span class="var-default"> 2</span>			(line <span class="line-number">55</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Errors + sending failures.</p>
	
	
		
		

</div>
<a name="var$LOG_NETWORK" id="$LOG_NETWORK"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$LOG_NETWORK</span>
			 = <span class="var-default"> 3</span>			(line <span class="line-number">59</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">All SMTP instructions + failures + errors.</p>
	
	
		
		

</div>
<a name="var$LOG_NOTHING" id="$LOG_NOTHING"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$LOG_NOTHING</span>
			 = <span class="var-default"> 0</span>			(line <span class="line-number">47</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Logging is off.</p>
	
	
		
		

</div>
<a name="var$maxSize" id="$maxSize"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">int</span>
			<span class="var-name">$maxSize</span>
			 = <span class="var-default"> 50</span>			(line <span class="line-number">73</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">The maximum number of log entries</p>
	
	
		
		

</div>
<a name="var$NORMAL" id="$NORMAL"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$NORMAL</span>
			 = <span class="var-default"> &quot;++&quot;</span>			(line <span class="line-number">43</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">A standard entry</p>
	
	
		
		

</div>
<a name="var$RESPONSE" id="$RESPONSE"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$RESPONSE</span>
			 = <span class="var-default"> &quot;&lt;&lt;&quot;</span>			(line <span class="line-number">35</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">A response type entry</p>
	
	
		
		

</div>
						
		</div>
	</div>
	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
							<a href="#sec-descendents">Descendents</a> |
															<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
																	<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>

<a name="methodadd" id="add"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">add</span> (line <span class="line-number">85</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Add a new entry to the log</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			add
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$text</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$type</span> = <span class="var-default">SWIFT_LOG_NORMAL</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$text</span><span class="var-description">: The information to log</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$type</span><span class="var-description">: The type of entry (see the constants: COMMAND, RESPONSE, ERROR, NORMAL)</span>			</li>
				</ul>
		
			
			<hr class="separator" />
		<div class="notes">Redefined in descendants as:</div>
		<ul class="redefinitions">
					<li>
				<a href="../Swift_Log/Swift_Log_DefaultLog.html#methodadd">Swift_Log_DefaultLog::add()</a>
								: Add a log entry
							</li>
				</ul>
	</div>
<a name="methodaddFailedRecipient" id="addFailedRecipient"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">addFailedRecipient</span> (line <span class="line-number">106</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Add a failed recipient to the list</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			addFailedRecipient
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$address</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$address</span><span class="var-description">: The address of the recipient</span>			</li>
				</ul>
		
			
	</div>
<a name="methodclear" id="clear"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">clear</span> (line <span class="line-number">94</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Empty the log contents</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			clear
		</span>
				()
			</div>
	
		
			
			<hr class="separator" />
		<div class="notes">Redefined in descendants as:</div>
		<ul class="redefinitions">
					<li>
				<a href="../Swift_Log/Swift_Log_DefaultLog.html#methodclear">Swift_Log_DefaultLog::clear()</a>
								: Empty the log
							</li>
				</ul>
	</div>
<a name="methoddump" id="dump"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">dump</span> (line <span class="line-number">90</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Dump the contents of the log to the browser.</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			dump
		</span>
					([<span class="var-type">boolean</span>&nbsp;<span class="var-name">$return_only</span> = <span class="var-default">false</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">boolean</span>
				<span class="var-name">$return_only</span><span class="var-description">: True if the string should be returned rather than output.</span>			</li>
				</ul>
		
			
			<hr class="separator" />
		<div class="notes">Redefined in descendants as:</div>
		<ul class="redefinitions">
					<li>
				<a href="../Swift_Log/Swift_Log_DefaultLog.html#methoddump">Swift_Log_DefaultLog::dump()</a>
								: Dump the contents of the log to the browser.
							</li>
				</ul>
	</div>
<a name="methodgetFailedRecipients" id="getFailedRecipients"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getFailedRecipients</span> (line <span class="line-number">115</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Get the list of failed recipients</p>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			getFailedRecipients
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetLogLevel" id="getLogLevel"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getLogLevel</span> (line <span class="line-number">149</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Get the current log level.</p>
	
	<div class="method-signature">
		<span class="method-result">int</span>
		<span class="method-name">
			getLogLevel
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgetMaxSize" id="getMaxSize"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getMaxSize</span> (line <span class="line-number">131</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Get the current maximum allowed log size</p>
	
	<div class="method-signature">
		<span class="method-result">int</span>
		<span class="method-name">
			getMaxSize
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodhasLevel" id="hasLevel"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">hasLevel</span> (line <span class="line-number">158</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Check if the log level includes the one given.</p>
	
	<div class="method-signature">
		<span class="method-result">boolean</span>
		<span class="method-name">
			hasLevel
		</span>
					(<span class="var-type">int</span>&nbsp;<span class="var-name">$level</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$level</span><span class="var-description">: Level</span>			</li>
				</ul>
		
			
	</div>
<a name="methodisEnabled" id="isEnabled"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">isEnabled</span> (line <span class="line-number">98</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Check if logging is enabled.</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			isEnabled
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodsetLogLevel" id="setLogLevel"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">setLogLevel</span> (line <span class="line-number">139</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Set the log level to one of the constants provided.</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setLogLevel
		</span>
					(<span class="var-type">int</span>&nbsp;<span class="var-name">$level</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$level</span><span class="var-description">: Level</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsetMaxSize" id="setMaxSize"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">setMaxSize</span> (line <span class="line-number">123</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Set the maximum size of this log (zero is no limit)</p>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setMaxSize
		</span>
					(<span class="var-type">int</span>&nbsp;<span class="var-name">$size</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$size</span><span class="var-description">: The maximum entries</span>			</li>
				</ul>
		
			
	</div>
						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Wed, 26 Mar 2008 20:33:48 +1100 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.1</a>
	</p>
	</div></body>
</html>